import struct

class RtpParser:
    def __init__(self):
        self.data = None

    def parse(self, data):
        self.data = data
        return self.data

    def dump(self, file):
        length = struct.pack(">H", len(self.data))
        file.write(length)
        file.write(self.data)
